#include <d3d9.h>
#include <d3dx9.h>

#include "CCore.h"
#include "CInput.h"
#include "..\\Content\\CContentHandler.h"
#include "..\\Content\\CWorld.h"
#include <boost/thread.hpp>



#ifndef CRENDERER_H__
#define CRENDERER_H__

namespace GameCore
{
class CRenderer
{
public:
	static CRenderer* getInstance(bool*);
	~CRenderer();

	void clean(void);
	void run();
	void setD3DParams(const	D3DPRESENT_PARAMETERS);
  void setWorld(Content::CWorld*);
	boost::mutex& getDeviceMutex(void);
private:
	CRenderer(bool*);
	

	


	static CRenderer* pInstance;

	boost::mutex deviceMutex;
	LPDIRECT3DDEVICE9 pD3DDevice;
	GameCore::CCamera* pCamera;
	D3DPRESENT_PARAMETERS d3dpp;
	bool* pDeviceLostFlag;
	bool renderEnabled;
	Content::CWorld* pWorld;


};
}//namesapce GameCore

#endif